const Router = require('koa-router');
const router = new Router();

const superagent = require('superagent');

const Mock = require('mockjs'); //生成模拟数据

router.prefix('/user')

router.get('/list', (ctx, next) => {
  ctx.body = tools.stateJson({
    data: [],
    total: 0
  });
});

router.get('/map', async (ctx, next) => {
  const d = await superagent.get('https://restapi.amap.com/v3/config/district?key=c7141f2d8070a07d371655223e39ad54');
  ctx.body = tools.stateJson(JSON.parse(d.text));
});




module.exports = router;